package com.lintesis.utils.sql;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SqlUtils {

	public static Object getFromResultSet(ResultSet rs, String sqlType, String name) throws SQLException
	{
		Object retorno=null;
		if(sqlType.equalsIgnoreCase("INTEGER"))
		{
			return rs.getInt(name);
		}
		if(sqlType.equalsIgnoreCase("Float"))
		{
			return rs.getFloat(name);
		}
		if(sqlType.equalsIgnoreCase("String"))
		{
			return rs.getString(name);
		}
		if(sqlType.equalsIgnoreCase("blob"))
		{
			return rs.getBlob(name);
		}
		if(sqlType.equalsIgnoreCase("long"))
		{
			return rs.getLong(name);
		}
		return retorno;
	}
	

}
